I2C      SDA:PB7  SCL:PB6   mpu6050, hmc5882

DBG_UART_INTERFACE  := 0    # stdout, stdin (UART0)
ERR_UART_INTERFACE  := 0    # stderr        (UART0)
DBG_TEE_INTERFACE   := -1   # stdout copy   (disabled)
ERR_TEE_INTERFACE   := -1   # stderr copy   (disabled)

make BOARD=stm32f103x APP=examples/i2c/hmc5883_compass prog

stm32f103x starting...

nano RTOS (C) 2022-2026 nanortos.com
hmc5883 compass

uart[0] ready
i2c[0] ready

# compass: no calibration data found, using default
dec    +588
inc   +5975
x_min  -287
y_min  -367
z_min  -577
x_max  +308
y_max  +221
z_max  +431
xv_min -500
yv_min -577
xv_max +520
yv_max +431

uart_input started
hmc5883 configured

mpu6050 configured
  Sleep Mode:        Disabled
  Clock Source:      PLL with X axis gyroscope reference
  Gyroscope:         1000 dps, x -172.379  y -90.156  z -29.477
  Accelerometer:     4G, gravity 9.693
  MPU6050_CONFIG     6


inclination={"x":1.714286,"y":1.714286,"a":1.714286}

compass_c={"h":   0.0,"x": -0.135,"y":  0.252,"z":  0.100,"x_raw": -142,"y_raw":  -92,"z_raw": -366,"x_min": -287,"y_min": -367,"z_min": -577,"x_max":  308,"y_max":  221,"z_max":  431,"xv_min": -500,"yv_min": -577,"xv_max":  520,"yv_max":  431,"zero":999,"z_ang":  -0,"e":"00"}
compass_i={"dec":  588,"inc": 5975}

compass={"h":  5.9,"x":-0.135,"y": 0.252,"z": 0.100}
compass={"h":147.5,"x":-0.164,"y": 0.407,"z": 0.674}
compass={"h":185.7,"x":-0.180,"y": 0.404,"z": 0.856}
compass={"h":186.4,"x":-0.172,"y": 0.402,"z": 0.946}
compass={"h":186.4,"x":-0.163,"y": 0.407,"z": 1.035}
compass={"h":185.7,"x":-0.182,"y": 0.402,"z": 1.122}
compass={"h":185.7,"x":-0.171,"y": 0.408,"z": 1.209}
compass={"h":185.7,"x":-0.155,"y": 0.420,"z": 1.294}
compass={"h":185.7,"x":-0.172,"y": 0.411,"z": 1.378}
compass={"h":186.2,"x":-0.161,"y": 0.410,"z": 1.462}
